mlir 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mlir/version.rb +1 -1
- data/lib/mlir.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bc3f4a8dbeafa481e2194908c41c6d742df55c7a165e2fb188233f61fa2bde9
|
4
|
+
data.tar.gz: b6b860eb5e8aa62a284bd26e7eea041a6aebd4b6abd6d6c08214f8fe084b3f99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5480114b8bedafc642fc35c2884d898ea1cbbb9048fa6b1a95af0e4b16e7deddd16eb6f945fa4bd5823f3d393737baa6798283b35e5efe726d738044c8207e55
|
7
|
+
data.tar.gz: 7d420d77a020cd36dc331fc07dc1e09e91b5832fdc1312689ac6a805ca9560b1324084d92ac7820fec201f8da43c77c70ec6f5e237edaf0a0e0c5863ac27023d
|
data/lib/mlir/version.rb
CHANGED
data/lib/mlir.rb
CHANGED
@@ -6,11 +6,11 @@ require "forwardable"
|
|
6
6
|
|
7
7
|
module MLIR
|
8
8
|
class Error < StandardError; end
|
9
|
-
|
9
|
+
MLIR::LIB_NAME = ENV["MLIR_LIB_NAME"] || "MLIR-C"
|
10
10
|
# FFI wrapper for MLIR C API
|
11
11
|
module CAPI
|
12
12
|
extend FFI::Library
|
13
|
-
ffi_lib
|
13
|
+
ffi_lib(MLIR::LIB_NAME)
|
14
14
|
IR_C_API_STRUCT_SYMBOLS = %i[
|
15
15
|
MlirAsmState
|
16
16
|
MlirBytecodeWriterConfig
|
@@ -37,6 +37,12 @@ module MLIR
|
|
37
37
|
Kernel.const_set(struct_symbol, klass)
|
38
38
|
end
|
39
39
|
|
40
|
+
class MlirDialectHandle < FFI::Struct
|
41
|
+
layout :ptr, :pointer
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
|
40
46
|
# mapped from MlirNamedAttribute
|
41
47
|
class MlirNamedAttribute < FFI::Struct
|
42
48
|
layout :name, MlirIdentifier.by_value,
|
@@ -109,6 +115,7 @@ module MLIR
|
|
109
115
|
attach_function :mlirContextAppendDialectRegistry, [MlirContext.by_value, MlirDialectRegistry.by_value], :void
|
110
116
|
attach_function :mlirStringRefCreateFromCString, [:string], MlirStringRef.by_value
|
111
117
|
attach_function :mlirContextGetOrLoadDialect, [MlirContext.by_value, MlirStringRef.by_value], :void
|
118
|
+
attach_function :mlirDialectHandleRegisterDialect, [MlirDialectHandle.by_value, MlirContext.by_value], :void
|
112
119
|
attach_function :mlirLocationUnknownGet, [MlirContext.by_value], MlirLocation.by_value
|
113
120
|
attach_function :mlirIndexTypeGet, [MlirContext.by_value], MlirType.by_value
|
114
121
|
|
@@ -131,6 +138,7 @@ module MLIR
|
|
131
138
|
attach_function :mlirModuleGetOperation, [MlirModule.by_value], MlirOperation.by_value
|
132
139
|
attach_function :mlirModuleFromOperation, [MlirOperation.by_value], MlirModule.by_value
|
133
140
|
attach_function :mlirModuleDestroy, [MlirModule.by_value], :void
|
141
|
+
attach_function :mlirModuleCreateParse, [MlirContext.by_value, MlirStringRef.by_value], MlirModule.by_value
|
134
142
|
|
135
143
|
# Region related
|
136
144
|
attach_function :mlirRegionCreate, [], MlirRegion.by_value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mlir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- johnlinvc
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|